import request from '../untils/request'

export const userLogin = ({
  username,
  password
}) => {
  return request.post("/login", {
    username,
    password
  });
};
export const rolePost = (arr) => {
  return request.post('/classes/roleMenu', arr)
}
export const roleGet = () => {
  return request.get('/classes/roleMenu')
}
export const userReg = ({
  username,
  password,
  roleName,
  roleId,
  roleMenu
}) => {
  return request.post('/users', {
    username,
    password,
    roleName,
    roleId,
    roleMenu
  })
}
export const echartsGet = () => {
  return request.get('/classes/Echarts')
}